<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html class="x-admin-sm">
<head>
<meta charset="UTF-8">
<title>添加管理员</title>
<%@include file="/WEB-INF/admin/head.jsp"%>
<%@include file="/WEB-INF/admin/common.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
</head>
<body>
	<div class="x-body">
		<form class="layui-form" lay-filter="myForm">
			<div class="layui-form-item">
				<label for="username" class="layui-form-label"> <span class="x-red">*</span>登录名
				</label>
				<div class="layui-input-inline">
					<input type="text" id="name" name="name" required="" lay-verify="required" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label for="username" class="layui-form-label"> <span class="x-red">*</span>创建日期
				</label>
				<div class="layui-input-inline">
					<input type="text"  value='<fmt:formatDate value="${test.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/>'	  name="createTime" required=""  lay-verify="required" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label for="username" class="layui-form-label"> <span class="x-red">*</span>内容
				</label>
				<div class="layui-input-inline">
					<input type="text"  name="content" required="" lay-verify="required" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<label class="layui-form-label">操作</label>
				<div class="layui-input-block">
					<button class="layui-btn" lay-filter="add" lay-submit="">增加</button>
				</div>
			</div>
		</form>
	</div>
	<script>
		layui.use([ 'form', 'layer','upload' ],function() {
			var $ = layui.jquery;
			var form = layui.form, layer = layui.layer;
			var upload = layui.upload;
				//监听提交
				form.on('submit(add)', function(data) {
					console.log(data);
					$.ajax({
			            type: "POST",
			            url: "${basePath }/admin/member/testsave.do",
			            contentType: 'application/x-www-form-urlencoded;charset=utf-8',
			     		data:data.field,
			            success: function(res){
			            	console.log(res);
			            	
				        }
					})
					return false;
				});

	});
	</script>

</body>

</html>